<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<link rel="stylesheet" href="../css/mui.min.css">
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<h1 id="title" class="mui-title">列表(下拉刷新和上拉加载)</h1>
		</header>
		<div class="mui-content"></div>
	</body>
	<script src="../js/mui.min.js"></script>
	<script type="text/javascript">
		 //预加载 列表子页面
		mui.init({
			//手势配置：启用 双击屏幕
			gestureConfig: {
				doubletap: true
			},
			subpages: [{
				url: 'pullrefresh_sub.html',
				id: 'pullrefresh_sub.html',
				//窗口参数
				styles: {
					top: '45px',
					bottom: '0px',
				}
			}]
		});
		 //双击标题栏：列表回滚到顶部
		var contentWebview = null;
		document.querySelector('header').addEventListener('doubletap', function() {
			if (contentWebview == null) {
				contentWebview = plus.webview.currentWebview().children()[0];
			}
			if (mui.os.ios) {
				contentWebview.evalJS("mui('#pullrefresh').pullRefresh().scrollTo(0,0,100)");
			} else {
				contentWebview.evalJS('mui.scrollTo(0, 100)');
			}
		});
	</script>

</html>